package com.topisv.tms.repository.stock.check;

import java.util.Date;
import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.topisv.tms.entity.stock.check.CheckPlan;

public abstract interface CheckPlanDao extends PagingAndSortingRepository<CheckPlan, Long>, JpaSpecificationExecutor<CheckPlan>
{

	@Query("select t from CheckPlan t where t.planCode=?")
	CheckPlan loadByPlanCode(String planCode);

	@Query("select t from CheckPlan t where t.customerCode=?1 and t.warehouseCode=?2 and t.createTime between ?3 and ?4")
	List<CheckPlan> loadByCondition(String customerCode, String warehouseCode,Date fromDate, Date toDate);

}